package org.cskj.demo.demo.controller;

import org.cskj.demo.pojo.Shoptype;
import org.cskj.demo.service.imp.ShopTypeImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@ResponseBody
@RequestMapping("/shoptype")
public class ShopTypeCon {
    @Autowired
    private ShopTypeImp shopTypeImp;
   @RequestMapping("/all")
    public List<Shoptype> getall(){
       List<Shoptype> list = shopTypeImp.selectAll();
       return list;
   }
}
